/*
 * NameSpaceDescription.java
 * 
 * last update: 30.01.2010 by Vlad Badoiu
 * 
 * author:	Alec(panovici@elcom.pub.ro)
 * 
 * Obs:
 */
package engine;

import java.util.*;
import middle.*;
import java.io.Serializable;

/**
 * The description of a NameSpace.
 */

interface NameSpaceDescription extends Serializable{

	String name();

	void addParameter(String name, int lineNo)throws ParseException;

	void defParam(String name, ExpressionDescription ex)throws ParseException;

	void addPort(String name, int lineNo, int type)throws ParseException;

	void addPort(String name, int lineNo, int type,
			ExpressionDescription msb,
			ExpressionDescription lsb)throws ParseException;

	void addConnection(String name, int lineNo,
			ExpressionDescription portExp)
	throws ParseException;

	/**
	 * Adds a submodule into this nameSpace.
	 */
	void addSubModule(String moduleName, int lineNo, String descName,
			Vector<ExpressionDescription> portsVector, Hashtable<String, ConnectionDescription> portsHash, Vector<ExpressionDescription> parameters,
			byte strength, Delay3Description delays)
	throws ParseException;

	public void addModuleArray(String moduleName, int lineNo,
			String descName, ExpressionDescription arrayStart,
			ExpressionDescription arrayEnd, Vector<ExpressionDescription> portsVector,
			Hashtable<String, ConnectionDescription> portsHash, Vector<ExpressionDescription> parameters,
			byte strength, Delay3Description delays)
	throws ParseException;

	/**
	 * Adds a new sub-scope within this nameSpace.
	 */
	 void addScope(NameSpaceDescription scope, int lineNo)
	 throws ParseException;

	 void addInitial(InstructionDescription ins, int lineNo)
	 throws ParseException;

	 void addAlways(InstructionDescription ins, int lineNo)
	 throws ParseException;

	 public void addFunction(String name, int lineNo)throws ParseException;

	 void addRegister(String name, int lineNo, ExpressionDescription msb,
			 ExpressionDescription lsb, ExpressionDescription arrayStart, 
			 ExpressionDescription arrayEnd)throws ParseException;


	 void addWire(String name, int lineNo, ExpressionDescription msb, 
			 ExpressionDescription lsb, int expandType, int netType,
			 Delay3Description delays)throws ParseException;

	 void addInteger(String name, int lineNo, ExpressionDescription arrayStart,
			 ExpressionDescription arrayEnd) throws ParseException;

	 void addReal(String name, int lineNo)throws ParseException;

	 void addConnection(int lineNo, AssignableSelection lValue,
			 ExpressionDescription rValue,
			 Delay3Description delays, byte strength)
	 throws ParseException;

	 void addTime(String name, int lineNo)throws ParseException;

	 void addRealTime(String name, int lineNo)throws ParseException;

	 void addEvent(String name, int lineNo)throws ParseException; //more parameters

	 void instantiateAll(NameSpace ns, ScopeNode thisScope)throws ParseException;

	 public String toString(int lineNo);

	 public String getFileName();
}






